<!--点击修改课程-->
<template>
  <div class="assessment-edit-plan-container" style="width:100%">
    <div class="my-form-container" style="width:100%;height: 100%;margin: 0px auto 18px;">
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">开课教研室<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            <el-select
              v-model="teachingClassName"
              style="width: 92%"
              placeholder="请选择"
            >
              <el-option
                v-for="(item,index) in courseTypeList"
                :key="index"
                :label="item.deptName"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程编号<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            <el-input v-model="courseCode" @blur="selectKCBH"></el-input>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程名称<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            <el-input v-model="courseName"></el-input>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程简称</div>
          <div class="my-form-item-value">
            <el-input v-model="courseSimpleName"></el-input>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程英文名称</div>
          <div class="my-form-item-value">
            <el-input v-model="courseEnName"></el-input>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">学 分<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            <el-input v-model="credit"></el-input>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">讲授学时</div>
          <div class="my-form-item-value">
            <el-input v-model="teachingHours"></el-input>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">实践学时</div>
          <div class="my-form-item-value">
            <el-input v-model="practiceHours"></el-input>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">总 学 时<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            <el-input v-model="totalHours"></el-input>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">学科分类</div>
          <div class="my-form-item-value">
            <el-select
              v-model="subjectType"
              style="width: 92%"
              placeholder="请选择"
            >
              <el-option
                v-for="item in xkflList"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">适用培养层次<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            <!-- <el-radio-group v-model="eduLevel">
              <el-radio
                :label="item.dictValue"
                v-for="(item, index) in levelList"
                :key="item.id"
                >{{ item.dictValue }}</el-radio
              >
            </el-radio-group> -->
            <el-select
              v-model="eduLevel"
              style=" width: 92%;
              margin-top: 15px;"
              placeholder="请选择"
            >
              <el-option
                v-for="item in levelList"
                :key="item.value"
                :label="item.dictValue"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程负责人</div>
          <div class="my-form-item-value">
            <el-autocomplete
              style="width: 92%"
              class="inline-input"
              v-model="courseCharger"
              :fetch-suggestions="querySearch"
              placeholder="请输入内容"
              :trigger-on-focus="false"
              @select="handleSelect"
            ></el-autocomplete>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程评价</div>
          <div class="my-form-item-value">{{ courseEvaluate }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">是否为主干课</div>
          <div class="my-form-item-value">
            <el-radio v-model="mainSubject" label="是">是</el-radio>
            <el-radio v-model="mainSubject" label="否">否</el-radio>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程类型</div>
          <div class="my-form-item-value">
            <el-select
              v-model="courseType"
             style="width: 64%"
              placeholder="请选择"
               @input="handleChangePlan"
                clearable
            >
              <el-option
                v-for="(item,index) in kcflList"
                :key="index"
                :label="item.flmc"
                :value="item.flmc"
              >
              </el-option>
            </el-select>
            <!-- <el-button
              type="warning"
              plain
              icon="el-icon-setting"
              style="margin-left:32px"
              size="mini"
              
              @click="$router.push('/admin/training/classification')"
              >课程类型维护</el-button
            > -->
            <button
              style="width:138px;height:28px;border:1px solid rgb(248, 105, 0);color: rgb(248, 105, 0);background: rgb(254, 241, 232);border-radius:6px;margin-left:10px"
              @click="$router.push('/admin/training/classification')"
              icon="el-icon-s-tools"
              size="mini"
              plain
              type="success"
            >
            <img
              src="../../../assets/assessment/设置.png"
              class="img"
              style="width: 17px;
                height: 17px;
                position: relative;
                top: 3px;"
            />
              课程类型维护
            </button>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">分制<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            <el-select  style=" width: 92%;" v-model="soreMian" placeholder="请选择">
              <el-option
                v-for="item in scoreList"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课下作业成绩所占比例</div>
          <div class="my-form-item-value">
            <el-input
              v-model.number.trim="homeworkRatio"
              @blur="checkoutNum"
            ></el-input>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课堂测试成绩所占比例</div>
          <div class="my-form-item-value">
            <el-input
              v-model.number.trim="hskeRatio"
              @blur="checkoutNum"
            ></el-input>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">期中考试成绩所占比例</div>
          <div class="my-form-item-value">
            <el-input
              v-model.number.trim="midExamRatio"
              @blur="checkoutNum"
            ></el-input>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课终考核成绩所占比例</div>
          <div class="my-form-item-value">
            <el-input
              v-model.number.trim="finalExamRetio"
              @blur="checkoutNum"
            ></el-input>
          </div>
          <!-- <div class="my-form-item-value">{{ tablelist.finalExamRetio }}</div> -->
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">考试成绩一票否决制<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            <el-radio
              v-model="scoreRadio"
              label="是"
              :disabled="outlineRadio == '是'"
              >是</el-radio
            >
            <el-radio
              v-model="scoreRadio"
              label="否"
              :disabled="outlineRadio == '是'"
              >否</el-radio
            >
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">大纲要求成绩比例<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            形成性考核成绩不低于
            <el-input
              class="mini"
              v-model.number.trim="downset"
              :disabled="outlineRadio == '否'"
            ></el-input>
            %，不高于<el-input
              class="mini"
              v-model.number.trim="upset"
              :disabled="outlineRadio == '否'"
            ></el-input
            >%
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item">
        <el-col :span="12">
          <div class="my-form-item-label">课程主页</div>
          <div class="my-form-item-value">{{ courseHomepage }}</div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">大纲要求一票否决制<span style="color: #ff3819">*</span></div>
          <div class="my-form-item-value">
            <el-radio v-model="outlineRadio" label="是" @change="radioChange"
              >是</el-radio
            >
            <el-radio v-model="outlineRadio" label="否" @change="radioChange"
              >否</el-radio
            >
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item" style="height: 160px">
        <el-col :span="12">
          <div style="width: 100%">
            <el-row class="my-form-item">
              <el-col :span="24" style="display: flex; align-items: center">
                <div class="my-form-item-label">课程标准</div>
                <div class="my-form-item-value">
                  <div style="display: grid;">
                    <el-input
                      v-model="fileNamearg"
                      style="width:350px"
                      :disabled="true"
                    ></el-input>
                    <span
                      slot="tip"
                      class="el-upload__tip"
                      style="line-height:20px;margin:0;"
                    >
                      文件大小不超过1000kb
                    </span>
                  </div>
                  <el-upload
                    class="upload-demo"
                    action=""
                    :headers="headers"
                    :on-success="uploadSuccess"
                    :before-upload="beforeUpload"
                    :file-list="fileList"
                    show-file-list="false"
                    :on-change="getFiles"
                    multiple
                   style="margin-left: 40px;margin-top: -15px;"
                  >
                    <button slot="trigger" style="
                      width: 90px;
                      height: 30px;
                      border:1px solid #5230e9;
                      border-radius: 6px;
                      color: #5230e9;
                      background: #efebff;
                    ">选择文件</button>
                  </el-upload>
                </div>
              </el-col>
            </el-row>
            <el-row class="my-form-item">
              <el-col :span="24" style="display: flex; align-items: center">
                <div class="my-form-item-label">先修课程</div>
                <div  class="my-form-item-value">
                  <el-input style="width:47%" v-model="addCourseList"></el-input>
                  <!-- <el-button
                    style="margin-left:20px"
                    @click="setClass"
                    icon="el-icon-s-tools"
                    size="mini"
                    plain
                    type="success"
                  >
                    课程设置
                  </el-button> -->
                  <button
                     style="width:110px;height:28px;border:1px solid #02c86c;color: #02c86c;background: #f1fff8;border-radius:6px;margin-left:10px"
                    @click="setClass"
                    icon="el-icon-s-tools"
                    size="mini"
                    plain
                    type="success"
                  >
                  <img
                    src="@/assets/assessment/205设置-线性.png"
                    class="img"
                    style="width: 15px;
                      height: 15px;
                      position: relative;
                      top: 2px;"
                  />
                    课程设置
                  </button>
                  <!-- <el-button
                    style="margin-left:20px"
                    @click="addCourseList = ''"
                    icon="el-icon-s-tools"
                    size="mini"
                    plain
                    type="success"
                  >
                    清除课程
                  </el-button> -->
                  <button
                    style="width:110px;height:28px;border:1px solid #ff3819;color: #ff3819;background: #ffefef;border-radius:6px;margin-left:10px"
                    @click="addCourseList = ''"
                    icon="el-icon-s-tools"
                    size="mini"
                    plain
                    type="success"
                  >
                    <img
                      src="@/assets/assessment/删除.png"
                      class="img"
                      style="width: 14px;
                        height: 14px;
                        position: relative;
                        top: 2px"
                    />
                    清除课程
                  </button>
                </div>
              </el-col>
            </el-row>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="my-form-item-label">课程组成员</div>
          <div class="my-form-item-value">
            <div>
              <p>
                <span v-for="(item, index) in kczcy" :key="index">
                  {{ item }}
                </span>
                <el-button
                  icon="el-icon-edit"
                  plain
                  circle
                  size="mini"
                  type="warning"
                  @click="addMember"
                ></el-button>
              </p>
            </div>
          </div>
        </el-col>
      </el-row>
      <el-row class="my-form-item" style="height: 100px">
        <el-col :span="24">
          <div class="my-form-item-label">课程简介</div>
          <el-input
            v-model="courseIntro"
            placeholder="请输入"
            class="zyjs"
          ></el-input>
        </el-col>
      </el-row>
      <el-row class="my-form-item" style="height: 100px">
        <el-col :span="24">
          <div class="my-form-item-label">备注</div>
          <el-input
            v-model="remark"
            placeholder="请输入"
            class="zyjs"
          ></el-input>
        </el-col>
      </el-row>

      <el-row class="my-form-item">
        <el-col :span="24">
          <div class="my-form-item-label">状态</div>
          <div class="my-form-item-value">
            <el-radio v-model="state" label="可用">可用</el-radio>
            <el-radio v-model="state" label="不可用">不可用</el-radio>
          </div>
        </el-col>
      </el-row>
    </div>
    <div class="button-group">
      <div @click="addCourseSave">
        <div>保 存</div>
      </div>
      <div @click="$router.push('/admin/course/coursesDe')">
        <div>取 消</div>
      </div>
      <!-- <el-button style="margin-right:10px" type="success" @click="addCourseSave" size="mini">保 存</el-button>      
      <el-button style="margin-left:30px"  type="danger" size="mini" @click="$router.push('/admin/course/courses')">取 消</el-button> -->
    </div>
    <!-- 课程负责人 -->
    <el-dialog
      title="课程负责人"
      :visible.sync="showCourseTeacher"
      width="50%"
      class="manual-entry-container"
    >
      <div class="body">
        <div style="display: flex">
          <div style="color: #004ca7; margin-left: 100px">课程负责人:</div>
          <el-autocomplete
            class="inline-input"
            v-model="courseCharger"
            :fetch-suggestions="querySearch"
            placeholder="请输入内容"
            :trigger-on-focus="false"
            @select="handleSelect"
          ></el-autocomplete>
          <button
            style="
              width: 76px;
              height: 40px;
              background: #f1f8fe;
              border: 1px solid #51aef6;
              opacity: 1;
              border-radius: 6px;
              color: #51aef6;
              margin-left: 20px;
            "
          >
            <img src="../../../assets/assessment/icon-search.png" class="img" />
            查询
          </button>
        </div>
        <div style="display: flex">
          <div style="color: #fd3819; margin-left: 100px">已选人员：</div>
          <el-input
            v-model="kcfzr"
            style="width: 200px; margin-left: 20px"
          ></el-input>
        </div>
        <span
          slot="footer"
          class="dialog-footer"
          style="width: 200px; margin: 0 auto; display: block"
        >
          <button
            @click="pjByIdGuide"
            style="
              width: 90px;
              height: 30px;
              border: 1px solid #f3b815;
              border-radius: 6px;
              color: #f3b815;
            "
          >
            确定
          </button>
        </span>
      </div>
    </el-dialog>
    <el-dialog
      title="选择教员"
      :visible.sync="showSelectStudent"
      class=" selectStudentDialog "
    >
      <div class="body">
        <el-row
          :gutter="24"
          style="margin-left: -11px;
    margin-right: -11px;
    border-bottom: 1px solid rgb(0, 76, 167);
    margin-bottom: 15px;"
        >
          <el-col :span="12">
            <div style="margin-top:5px">
              <el-radio v-model="selectType" label="allSchool"
                >全院范围</el-radio
              >
              <el-radio v-model="selectType" label="selectSchool"
                >所选范围</el-radio
              >
            </div>
          </el-col>
          <el-col :span="12">
            <div style="margin-left:175px;color:#004ca7;margin-bottom: 15px;">
              <span>姓名：</span>
              <el-autocomplete
                class="inline-input"
                v-model="useName"
                :fetch-suggestions="querySearchName"
                placeholder="请输入内容"
                :trigger-on-focus="false"
                @select="handleNameSelect"
              ></el-autocomplete>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="4">
            <el-tree
              :data="treeData"
              :props="defaultProps"
              default-expand-all
              :filter-node-method="filterNode"
              @node-click="handleNodeClick"
              ref="tree"
            ></el-tree>
          </el-col>
          <el-col :span="9">
            <div
              style="border:1px solid rgba(0, 76, 167, 1);border-radius:5px; margin-top:5px;overflow:hidden;"
            >
              <h4
                style="text-align:center;font-size:16px;color:rgba(0, 76, 167, 1);line-height:25px;"
              >
                可选的专业列表 ( {{ tableLeftData.length }} 个)
              </h4>
              <el-table
                :data="tableLeftData"
                style="width: 100%"
                border
                max-height="290"
                @selection-change="handleSelectionChange"
              >
                <el-table-column
                  type="selection"
                  label="选择"
                  width="55"
                  header-align="centrer"
                >
                </el-table-column>
                <el-table-column
                  prop="xm"
                  label="姓名"
                  width="width"
                  header-align="centrer"
                >
                </el-table-column>
                <el-table-column
                  prop="gzbm"
                  label="教研室"
                  width="width"
                  header-align="centrer"
                >
                </el-table-column>
              </el-table>
            </div>
          </el-col>
          <el-col :span="1">
            <el-button
              style="margin-top: 85px;
               margin-left: -13px;"
              type="primary"
              circle
              icon="el-icon-arrow-right"
              @click="sendRight"
            ></el-button>
          </el-col>
          <el-col :span="9">
            <div
              style="border:1px solid rgba(0, 76, 167, 1);border-radius:5px; margin-top:5px;overflow:hidden;"
            >
              <h4
                style="text-align:center;font-size:16px;color:rgba(0, 76, 167, 1);line-height:25px;"
              >
                已选的专业列表 ( {{ tableRightData.length }} 个)
              </h4>
              <el-table
                :data="tableRightData"
                style="width: 100%"
                border
                max-height="290"
              >
                <el-table-column prop="xm" label="姓名" header-align="centrer">
                </el-table-column>
                <el-table-column
                  prop="gzbm"
                  label="教研室"
                  width="width"
                  header-align="centrer"
                >
                </el-table-column>
                <el-table-column
                  label="操作"
                  width="width"
                  header-align="centrer"
                >
                  <template slot-scope="{ row, $index }">
                    <el-button
                      type="danger"
                      icon="el-icon-delete"
                      size="mini"
                      @click="removeLeft(row, $index)"
                      >删除</el-button
                    >
                  </template>
                </el-table-column>
              </el-table>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="24" style="text-align:center;padding-top:15px;">
           <div class="button-group">
              <div @click="selectStudentList">
                <div>保 存</div>
              </div>
              <div @click="showSelectStudent = false">
                <div>取 消</div>
              </div>
            </div>
        
           <!-- <el-button style="margin-right:10px" type="success"  @click="selectStudentList" size="mini">保 存</el-button>
       
         <el-button style="margin-left:30px" type="danger" size="mini"  @click="showSelectStudent = false">取 消</el-button> -->
           </el-col>
        </el-row>
      </div>
    </el-dialog>

    <el-dialog
      title="课程设置"
      :visible.sync="showDialogVisible"
      class="manual-entry-container courseSetDialog"
      width="1400px"
    >
      <div style="width: 100%;height: 350px;position:relative">
        <el-tree
          style="position: absolute;left: 30px;top: 2%;width: 120px;color: #004ca7;background: none;"
          :data="treeData"
          :props="defaultProps"
          default-expand-all
          :filter-node-method="filterNode1"
          @node-click="handleNodeClick1"
          ref="tree"
        ></el-tree>
        <div style="width: 80%;position: absolute;top: 2%;right:60px"> 
          <div class="search-container-item" style="color: #004ca7;display: inline-flex;">
            <span style="line-height: 28px;">课程名称：</span>
            <el-input
              style="width: 120px"
              size="mini"
              clearable
              v-model="courseNameSea"
              placeholder="请输入内容"

            ></el-input>
          </div>
          <div class="search-container-item" style="color: #004ca7;display: inline-flex;margin-left:20px">
            <span style="line-height: 28px;">课程编号：</span>
            <el-input
              style="width: 120px"
              size="mini"
              clearable
              v-model="courseNumberSea"
              placeholder="请输入内容"
            ></el-input>
          </div>
          <div class="search-button" style="display: inline-flex;margin-left:20px" @click="reqCheckSearch">
            <img src="../../../assets/assessment/icon-search.png" alt=""/>
            <span>查询</span>
          </div>
          <el-table
            :data="treeTableDataDialog"
            style="margin-top:15px"
            class="xpaasOne-table-class"
            row-class-name="xpaasOne-row-class"
            cell-class-name="xpaasOne-cell-class"
            header-row-class-name="xpaasOne-header-row-class"
            header-cell-class-name="xpaasOne-header-cell-class"
            highlight-current-row
            @selection-change="handleSelectionChange1"
            ><el-table-column label="选择" width="55" type="selection">
            </el-table-column>
            <el-table-column prop="courseCode" label="课程编号" align="center">
            </el-table-column>
            <el-table-column prop="courseName" label="课程名称" align="center">
            </el-table-column>
            <el-table-column prop="courseSimpleName" label="简称" align="center">
            </el-table-column>
            <el-table-column prop="credit" label="学分" align="center">
            </el-table-column>
            <el-table-column prop="totalHours" label="总学时" align="center">
            </el-table-column>
            <el-table-column prop="levelname" label="适用培养层次" align="center">
            </el-table-column>
            <el-table-column prop="mainSubject" label="是否主干课" align="center">
            </el-table-column>
            <el-table-column prop="remark" label="备注" align="center">
            </el-table-column>
          </el-table>
        </div>
        <div class="block" style="position: absolute;bottom: -10px;right: 60px;margin-top:15px">
          <el-pagination
            style="width:auto;padding:0"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="pageNo"
            :page-sizes="[3]"
            :page-size="pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="total">
          >
          </el-pagination>
        </div>
      </div>
      <!-- <div style="    background-color: #fff;display:flex;flex-direction: row-reverse;">
          <el-pagination
          
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currentPage4"
          :page-sizes="[10, 20, 30]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
        >
        </el-pagination>
        </div> -->
      <div class="button-group" style="position:absolute;bottom:50px;left: 40%;">
        <div @click="showDialogVisible = false">
          <div>保 存</div>
        </div>
        <div @click="showDialogVisible = false">
          <div>取 消</div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { reqCheckLevelList } from "@/api/admin1/check.js";
import { szChild,queryFirstcoursetype } from "@/api/propositionReview/approval";
import { loadDeptListByCategory } from '@/api/dept.js'
import { reqCheckBottomData,selectKCBH } from '@/api/course/courses'
import {
  reqDeleteCourse,
  reqGetTreeTableDatas,
  reqCheckCourseTeacher,
  reqgetTree,
  reqClickTreeCheckLeftTable,
  reqCourseList,
  updateAddCourseList,
  reqeditById,
  reqUpload
} from "@/api/course/courses.js";
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      courseNameSea:'',
      courseNumberSea:'',
      parentId: "0",
      pageNo: 1,
      pageSize: 3,
      total: "",
      // 适用培养层次
      kcflList: [],
      levelList: [],
      code: "pylevel",
      eduLevel: "",
      // 添加课程负责人弹窗显示隐藏
      showCourseTeacher: false,
      // 收集课程负责人数据
      courseChargerList: [],
      courseCharger: "",
      soreMian: "",
      scoreList: [
        {
          value: "百分制",
          label: "百分制"
        },
        {
          value: "四分制",
          label: "四分制"
        },
        {
          value: "五分制",
          label: "五分制"
        },
        {
          value: "二分制",
          label: "二分制"
        }
      ],
      // 课下作业所占比例
      homeworkRatio: "",
      fileNamearg: "",
      //   课堂测试所占比例
      hskeRatio: "",
      //   期中考试所占比例
      midExamRatio: "",
      // 期末考试所占比例
      finalExamRetio: "",
      //   不高于
      upset: "",
      index:"xg",
      //   不低于
      downset: "",
      // 大纲要求一票否决制
      outlineRadio: "否",
      //考试成绩一票否决制
      scoreRadio: "是",
      // 控制课程组成员弹窗显示隐藏
      dialogCourse: true,
      rightData: [],
      //   选择教员弹窗
      showSelectStudent: false,
      useName: "",
      selectType: "allSchool",
      checkStudentList: [],
      treeData: [],
      tableLeftData: [],
      tableCenterData: [],
      //   课程组成员
      tableRightData: [],
      tester: false,
      // 课程设置弹窗
      showDialogVisible: false,
      treeTableDataDialog: [],
      addCourseList: "",
      // 课程分类
      courseType: "",
      courseTypeList: [],
      kclxList: [],
      xkflList: [
        {
          value: "哲学",
          label: "哲学"
        },
        {
          value: "经济学",
          label: "经济学"
        },
        {
          value: "法学",
          label: "法学"
        },
        {
          value: "教育学",
          label: "教育学"
        },
        {
          value: "文学",
          label: "文学"
        },
        {
          value: "历史学",
          label: "历史学"
        },
        {
          value: "理学",
          label: "理学"
        },
        {
          value: "工学",
          label: "工学"
        },
        {
          value: "农学",
          label: "农学"
        },
        {
          value: "医学",
          label: "医学"
        },
        {
          value: "军事学",
          label: "军事学"
        },
        {
          value: "管理学",
          label: "管理学"
        }
      ],
      // 文件名称
      fileName: "",
      fileList: [],
      headers: {
        token: this.$store.getters.token
      },
      totalHours: "",
      teachingClassName: "",
      courseCode: "",
      courseName: "",
      courseEnName: "",
      courseSimpleName: "",
      credit: "",
      teachingHours: "",
      practiceHours: "",
      subjectType: "",
      courseEvaluate: "合格",
      syzy: "123",
      kcfl: "分类一",
      hjdj: "",
      showYprDialog: true,
      mainSubject: "",
      state: "可用",
      courseIntro: "",
      remark: "",
      courseHomepage: "",
      kczcy: "",
      id: "",
      editSave:'',
    };
  },
  mounted() {
    this.getInit();
    this.getLevelList();
    if (this.$route.query.id) {
      this.getInitInfo();
    }
    this.getCourseList();
    // this.getdetail();
    // this.getCreateDId(this.tablelist)
    console.log(this.$store.getters.token);
  },
  computed: {
    ...mapGetters({
      Myhead() {
        return { token: this.$store.getters.token };
      }
    })
  },
  methods: {
    //课程编号查重
    selectKCBH(){
      if(this.courseCode == this.editSave){
        return
      } else {
        selectKCBH(this.courseCode).then(res=>{
          if(res.status == 200 && res.data == false){
            this.$message({
              type:'error',
              message:'该课程编号已存在！'
            })
            this.courseCode = '';
          }
        })
      }
    },
    handleCurrentChange(val) {
      this.pageNo = val;
      this.getTreeData1();
    },
    handleSizeChange(val) {
      this.pageSize = val;
      this.getTreeData1();
    },
    kclxwh(){ 
      this.$router.push({path:"/admin/training/classification",query:{index:this.index}});
    },
      //培养分类方案下拉框
    async getInit() {
      const result = await queryFirstcoursetype();
      if (result.data.code == 200 && result.data.data.length > 0) {
        this.kcflList = result.data.data;
        console.log(this.kcflList)
      } else {
        this.$message({ type: "error", message: "培养方案分类获取失败！" });
      }
    },
    async getInitInfo() {
      const result = await reqeditById(this.$route.query.id);
      if (result.data.code == 200) {
        console.log(result.data.data, "=====-");
        this.teachingClassName = result.data.data.teachingClassName;
        this.courseCode = result.data.data.courseCode;
        this.editSave = result.data.data.courseCode;
        this.courseName = result.data.data.courseName;
        this.courseSimpleName = result.data.data.courseSimpleName;
        this.courseEnName = result.data.data.courseEnName;
        this.credit = result.data.data.credit;
        this.teachingHours = result.data.data.teachingHours;
        this.practiceHours = result.data.data.practiceHours;
        this.totalHours = result.data.data.totalHours;
        this.subjectType = result.data.data.subjectType;
        this.eduLevel = result.data.data.eduLevel;
        this.courseCharger = result.data.data.courseCharger;
        this.courseEvaluate = result.data.data.courseEvaluate;
        this.mainSubject = result.data.data.mainSubject;
        this.courseType = result.data.data.courseType;
        this.soreMian= result.data.data.pointsSystem;
        this.homeworkRatio = result.data.data.homeworkRatio;
        this.hskeRatio = result.data.data.hskeRatio;
        this.midExamRatio = result.data.data.midExamRatio;
        this.finalExamRetio = result.data.data.finalExamRetio;
        this.scoreRadio = result.data.data.gradeOneVeto;
        this.fileNamearg = result.data.data.courseStandard.split(';')[1];
        //  this.fileNamearg= result.data.data.courseStandard.split(';')[1];
        this.addCourseList = result.data.data.prerequisiteCourse;
        this.courseIntro = result.data.data.courseIntro;
        this.remark = result.data.data.remark;
        this.state = result.data.data.state;
        this.outlineRadio = result.data.data.dgyqpage;
        this.downset = result.data.data.dgdy
        this.upset = result.data.data.dggy
        // 课程主页暂时没有数据
        this.courseHomepage = result.data.data.courseHomepage;
        this.id = this.$route.query.id;
        this.kczcy = result.data.data.kczcy;
      }
    },
    // 添加课程的保存事件
    async addCourseSave() {
      if (this.fileNamearg != "") {
        
        if(this.fileName == ""){
          this.fileName = this.fileNamearg
          console.log(this.fileName,"有路径没改");
           let arr = [];
        this.tableRightData.forEach(element => {
          arr.push(element.id + "/" + element.xm);
        });
        let kczcy = arr.join(",");
        console.log(kczcy, "1111111111111////");
        let obj = {
          id: this.$route.query.id,
          teachingClassName: this.teachingClassName,
          courseCode: this.courseCode,
          courseName: this.courseName,
          courseSimpleName: this.courseSimpleName,
          courseEnName: this.courseEnName,
          credit: this.credit,
          teachingHours: this.teachingHours,
          practiceHours: this.practiceHours,
          totalHours: this.totalHours,
          subjectType: this.subjectType,
          eduLevel: this.eduLevel,
          courseCharger: this.courseCharger,
          courseEvaluate: "合格",
          mainSubject: this.mainSubject,
          courseType: this.courseType,
          pointsSystem: this.soreMian,
          homeworkRatio: this.homeworkRatio,
          hskeRatio: this.hskeRatio,
          midExamRatio: this.midExamRatio,
          finalExamRetio: this.finalExamRetio,
          gradeOneVeto: this.scoreRadio,
          courseStandard: this.fileName,
           dgdy: this.downset,
                dggy: this.upset,
          prerequisiteCourse: this.addCourseList,
          kczcy: kczcy == "" ? this.kczcy : kczcy,
          courseIntro: this.courseIntro,
          remark: this.remark,
          state: this.state,
          dgyqpage: this.outlineRadio,
          // 课程主页暂时没有数据
          courseHomepage: ""
        };
        updateAddCourseList(obj).then(res => {
          if (res.data.code == 200) {
            this.$message({ type: "success", message: "保存成功" });
            this.$router.push("/admin/course/coursesDe");
            return "ok";
          }
        });
        }else{
          console.log(this.fileName,"有路径改了");
          let arr = [];
        this.tableRightData.forEach(element => {
          arr.push(element.id + "/" + element.xm);
        });
        let kczcy = arr.join(",");
        let form = new FormData();
        form.append("file", this.fileName);
        let fieldata = "";
        new Promise(() => {
          reqUpload(form).then(res => {
            console.log(res.data.data, "aaaaaaa");
            if (res.data.code === 200) {
              // this.getdetail();
              fieldata = res.data.data;
              console.log(fieldata,"ssssssssssssssssss+++")
              let obj = {
                id: this.$route.query.id,
                teachingClassName: this.teachingClassName,
                courseCode: this.courseCode,
                courseName: this.courseName,
                courseSimpleName: this.courseSimpleName,
                courseEnName: this.courseEnName,
                credit: this.credit,
                teachingHours: this.teachingHours,
                practiceHours: this.practiceHours,
                totalHours: this.totalHours,
                subjectType: this.subjectType,
                eduLevel: this.eduLevel,
                courseCharger: this.courseCharger,
                courseEvaluate: "合格",
                mainSubject: this.mainSubject,
                courseType: this.courseType,
                pointsSystem: this.soreMian,
                homeworkRatio: this.homeworkRatio,
                hskeRatio: this.hskeRatio,
                midExamRatio: this.midExamRatio,
                finalExamRetio: this.finalExamRetio,
                gradeOneVeto: this.scoreRadio,
                courseStandard: fieldata,
                 dgdy: this.downset,
                dggy: this.upset,
                prerequisiteCourse: this.addCourseList,
                kczcy: kczcy == "" ? this.kczcy : kczcy,
                courseIntro: this.courseIntro,
                remark: this.remark,
                state: this.state,
                dgyqpage: this.outlineRadio,
                // 课程主页暂时没有数据
                courseHomepage: ""
              };
              updateAddCourseList(obj).then(res => {
                if (res.data.code == 200) {
                  this.$message({ type: "success", message: "保存成功" });
                  this.$router.push("/admin/course/coursesDe");
                  return "ok";
                }
              });
            } else {
              el.$message({
                showClose: true,
                message: "上传失败，请重新上传",
                type: "error"
              });
            }
          });
        });
        }
        
      } else {
        console.log("22");
        // debugger
        let arr = [];
        this.tableRightData.forEach(element => {
          arr.push(element.id + "/" + element.xm);
        });
        let kczcy = arr.join(",");
        console.log(kczcy, "1111111111111////");
        let obj = {
          id: this.$route.query.id,
          teachingClassName: this.teachingClassName,
          courseCode: this.courseCode,
          courseName: this.courseName,
          courseSimpleName: this.courseSimpleName,
          courseEnName: this.courseEnName,
          credit: this.credit,
          teachingHours: this.teachingHours,
          practiceHours: this.practiceHours,
          totalHours: this.totalHours,
          subjectType: this.subjectType,
          eduLevel: this.eduLevel,
          courseCharger: this.courseCharger,
          courseEvaluate: "合格",
          mainSubject: this.mainSubject,
          courseType: this.courseType,
          pointsSystem: this.soreMian,
          homeworkRatio: this.homeworkRatio,
          hskeRatio: this.hskeRatio,
          midExamRatio: this.midExamRatio,
          finalExamRetio: this.finalExamRetio,
          gradeOneVeto: this.scoreRadio,
          courseStandard: "",
          prerequisiteCourse: this.addCourseList,
          kczcy: kczcy == "" ? this.kczcy : kczcy,
          courseIntro: this.courseIntro,
          remark: this.remark,
          state: this.state,
          dgyqpage: this.outlineRadio,
          // 课程主页暂时没有数据
          courseHomepage: ""
        };
        updateAddCourseList(obj).then(res => {
          if (res.data.code == 200) {
            this.$message({ type: "success", message: "保存成功" });
            this.$router.push("/admin/course/coursesDe");
            return "ok";
          }
        });
      }
      // console.log(this.fileNamearg,"1111111111")
    },
    // 查询教研室
    // async getCourseList() {
    //   const result = await reqCourseList();
    //   if (result.data.code == 200) {
    //     this.courseTypeList = result.data.data;
    //     this.courseTypeList.forEach(item => {
    //       item.value = item.deptName;
    //     });
    //   }
    // },

    // 查询教研室
    async getCourseList() {
      let deptCategory = '7'
      loadDeptListByCategory(deptCategory).then((res) => {
        this.courseTypeList = res.data
      })
    },
    async getLevelList() {
      const result = await reqCheckLevelList(this.code);
      if (result.data.code == 200) {
        this.levelList = result.data.data[0].children;
      }
    },
    // 添加课程负责人--查询
    async querySearch(queryString, cb) {
      const result = await reqCheckCourseTeacher(queryString);
      if (result.data.code == 200) {
        this.courseChargerList = result.data.data;
      }
      this.courseChargerList.forEach(item => {
        item.value = item.xm;
      });
      // 调用 callback 返回建议列表的数据
      cb(this.courseChargerList);
    },
    handleSelect(item) {
      this.courseCharger = item.xm;
    },
    // 校验 课下作业所占比例  课堂测试所占比例  期中考试所占比例  期末考试所占比例  四个值与大纲要求成绩比例
    checkoutNum() {
      if (this.upset && this.downset) {
        if (
          this.homeworkRatio < this.downset ||
          this.homeworkRatio > this.upset
        ) {
          this.$message({
            type: "error",
            message:
              "课下作业所占比例应该设置在" +
              this.downset +
              "-" +
              this.upset +
              "之间"
          });
          this.homeworkRatio = "";
        }
        if (this.hskeRatio < this.downset || this.hskeRatio > this.upset) {
          this.$message({
            type: "error",
            message:
              "课堂测试所占比例应该设置在" +
              this.downset +
              "-" +
              this.upset +
              "之间"
          });
          this.hskeRatio = "";
        }
        if (
          this.midExamRatio < this.downset ||
          this.midExamRatio > this.upset
        ) {
          this.$message({
            type: "error",
            message:
              "期中考试所占比例应该设置在" +
              this.downset +
              "-" +
              this.upset +
              "之间"
          });
          this.midExamRatio = "";
        }
        if (
          this.finalExamRetio < this.downset ||
          this.finalExamRetio > this.upset
        ) {
          this.$message({
            type: "error",
            message:
              "期末考试所占比例应该设置在" +
              this.downset +
              "-" +
              this.upset +
              "之间"
          });
          this.finalExamRetio = "";
        }
      }
      if (
        this.homeworkRatio &&
        this.hskeRatio &&
        this.midExamRatio &&
        this.finalExamRetio
      ) {
        let result =
          this.homeworkRatio +
          this.hskeRatio +
          this.midExamRatio +
          this.finalExamRetio;
        if (result > 100) {
          this.$message({
            type: "error",
            message:
              "课下作业所占比例,课堂测试所占比例,期中考试所占比例,期末考试所占比例,四个值的总和不能大于100"
          });
          return;
        }
      }
    },
    // 改变大纲要求一票否决制
    radioChange() {
      if (this.outlineRadio == "是") {
        this.scoreRadio = "是";
      } else {
        this.upset = "";
        this.downset = "";
      }
    },
    // 添加课程组成员
    addMember() {
      this.showSelectStudent = true;
      this.getTreeList();
    },
    async querySearchName(queryString, cb) {
      const result = await reqClickTreeCheckLeftTable(
        this.treeChildrenName,
        queryString
      );
      if (result.data.code == 200) {
        this.checkStudentList = result.data.data;
        this.checkStudentList.forEach(item => {
          item.value = item.xm;
        });
      }
      // 调用 callback 返回建议列表的数据
      cb(this.checkStudentList);
    },
    handleNameSelect(item) {
      this.tableLeftData = [item];
    },
    // handleTransfer(type, data, callback) {
    //   console.log(type, data, callback, "============");
    //   if (type == "left") {
    //     this.rightData = this.rightData.concat(this.leftData[data]);
    //   } else {
    //     this.leftData = this.leftData.concat(this.rightData[data]);
    //   }
    //   this[type + "Data"].splice(data, 1);
    //   callback(type);
    // },
    // handleSort(type, sortType, data, callback) {
    //   console.log(type, sortType, data, callback, "============");
    //   if (!sortType || sortType == "right") {
    //     if (type == "up") {
    //       this.rightData = this.swapItems(this.rightData, data[1], data[1] - 1);
    //       callback(sortType, [data[0], data[1] - 1]);
    //     } else {
    //       this.rightData = this.swapItems(this.rightData, data[1], data[1] + 1);
    //       callback(sortType, [data[0], data[1] + 1]);
    //     }
    //   } else if (sortType == "left") {
    //     if (type == "up") {
    //       this.leftData = this.swapItems(this.leftData, data[0], data[0] - 1);
    //       callback(sortType, [data[0] - 1, data[1]]);
    //     } else {
    //       this.leftData = this.swapItems(this.leftData, data[0], data[0] + 1);
    //       callback(sortType, [data[0] + 1, data[1]]);
    //     }
    //   } else if (sortType == "both") {
    //     if (type == "up") {
    //       data[0] == 0
    //         ? ""
    //         : (this.leftData = this.swapItems(
    //             this.leftData,
    //             data[0],
    //             data[0] - 1
    //           ));
    //       data[1] == 0
    //         ? ""
    //         : (this.rightData = this.swapItems(
    //             this.rightData,
    //             data[1],
    //             data[1] - 1
    //           ));
    //       callback(sortType, [
    //         data[0] == 0 ? data[0] : data[0] - 1,
    //         data[1] == 0 ? data[1] : data[1] - 1
    //       ]);
    //     } else {
    //       data[0] == this.leftData.length - 1
    //         ? ""
    //         : (this.leftData = this.swapItems(
    //             this.leftData,
    //             data[0],
    //             data[0] + 1
    //           ));
    //       data[1] == this.rightData.length - 1
    //         ? ""
    //         : (this.rightData = this.swapItems(
    //             this.rightData,
    //             data[1],
    //             data[1] + 1
    //           ));
    //       callback(sortType, [
    //         data[0] == this.leftData.length - 1 ? data[0] : data[0] + 1,
    //         data[1] == this.rightData.length - 1 ? data[1] : data[1] + 1
    //       ]);
    //     }
    //   }
    // },
    // swapItems(arr, index1, index2) {
    //   arr[index1] = arr.splice(index2, 1, arr[index1])[0];
    //   return arr;
    // },
    // // 排序保存点击事件
    // async saveSortRow() {
    //   console.log(this.rightData, "this.rightData");
    // },

    //获取树的数据
    async getTreeList() {
      const result = await reqgetTree(this.parentId);
      if (result.data.code == 200) {
        let arrs = result.data.data.filter(item=>{
          return item.deptCategory == 5
        })
        this.treeData = arrs
      }
      this.treeData.forEach((item) => {
        item.label = item.deptName
      })
    },
    async handleNodeClick(val, valNode) {
      const result = await reqgetTree(val.id);
      if (result.data.code == 200) {
        this.$set(val, "children", result.data.data);
      }
      val.children.forEach(item => {
        item.label = item.deptName;
      });
      this.treeChildrenName = val.deptName;
      this.treeParentName = valNode.parent.data.deptName;
      if (this.treeChildrenName && this.treeParentName) {
        this.getTreeData();
      }
    },
    async getTreeData() {
      const tableDataResult = await reqClickTreeCheckLeftTable(
        this.treeChildrenName
      );
      if (tableDataResult.data.code == 200) {
        this.tableLeftData = tableDataResult.data.data;
        this.treeTableData.forEach(item => {
          this.$set(item, "checked", false);
        });
      }
    },
     //选择培养方案事件
    handleChangePlan(index){
      if(index){
        this.tablelist.planFlId = this.kcflList[index].id;
        this.tablelist.pyfafl = this.kcflList[index].flmc;
      }
    },
    handleSelectionChange(selection) {
      this.tableCenterData = selection;
    },
    sendRight() {
      this.tableRightData = this.tableCenterData;
    },
    // 选择教员弹窗的确定按钮
    selectStudentList() {
      this.showSelectStudent = false;
      let arr = [];
      this.tableRightData.forEach(item => {
        arr.push(item.xm);
      });
      this.kczcy = arr;
    },
    // 选择教员弹窗的删除按钮
    removeLeft(row, index) {
      this.tableRightData.splice(index, 1);
    },
    filterNode(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    // 点击课程设置
    setClass() {
      this.showDialogVisible = true;
      this.getTreeList();
    },

    //课程设置查询
    reqCheckSearch(){
      if(this.courseNumberSea == '' && this.courseNameSea == ''){
        this.pageNo = 1
        this.getTreeData1();
        return
      } else {
        reqCheckBottomData(this.pageNo,this.pageSize,'',this.courseNumberSea,this.courseNameSea).then(res=>{
          if(res.data.code == 200){
            this.treeTableDataDialog = res.data.data;
            this.total = res.data.data.length > 0 ? res.data.data[0].tol : ''
          }
        })
      }
    },
    //获取树的数据
    async handleNodeClick1(val, valNode) {
      this.courseNameSea = '';
      this.courseNumberSea = '';
      const result = await reqgetTree(val.id);
      if (result.data.code == 200) {
        this.$set(val, "children", result.data.data);
      }
      val.children.forEach(item => {
        item.label = item.deptName;
      });
      this.treeChildrenName = val.id;
      this.treeParentName = valNode.parent.data.id;
      if (this.treeChildrenName && this.treeParentName) {
        this.pageNo = 1
        this.getTreeData1();
      }
    },
    async getTreeData1() {
      const tableDataResult = await szChild(
        this.pageNo,
        this.pageSize,
        this.treeChildrenName
      );
      if (tableDataResult.data.code == 200) {
        this.treeTableDataDialog = tableDataResult.data.data;
        this.total = this.treeTableDataDialog.length > 0 ? this.treeTableDataDialog[0].tol : ''
        this.treeTableDataDialog.forEach(item => {
          this.$set(item, "checked", false);
        });
      }
    },

    filterNode1(value, data) {
      if (!value) return true;
      return data.label.indexOf(value) !== -1;
    },
    // 选择表格数据----单选
    selectOneRow(row) {
      this.treeTableData.forEach(item => {
        item.checked = false;
      });
      row.checked = true;
    },
    // 课程设置弹窗的确定按钮点击事件
    saveTreeTableDataId() {
      this.addCourseList.kcbh = obj.courseCode;
      this.addCourseList.kcid = obj.id;
      this.showDialogVisible = false;
      this.$message({ type: "success", message: "保存成功" });
    },
    // 批量删除
    handleSelectionChange1(section) {
      const arr = [];
      const courseList = [];
      section.forEach(item => {
        arr.push(item.id);
        courseList.push(item.courseName);
      });
      this.removeAllIds = arr.join(",");
      this.addCourseList = courseList.join(",");
    },
    async removeAll() {
      const result = await reqDeleteCourse(this.removeAllIds);
      if (result.data.code == 200) {
        this.getAwardCoursesList(
          (this.pageNo =
            this.tableData.length > 1 ? this.pageNo : this.pageNo - 1)
        );
      }
    },

    // 上传文件
    beforeUpload(file) {
      console.log("beforeUpload", file);
    },
    uploadSuccess(response, file, fileList) {},
    pjByIdGuide() {},
    getFiles(file) {
      console.log(file.raw, "898989");
      console.log(file, "222222222");
      this.fileName = file.raw;
      this.fileNamearg = file.name;
      // return new Promise(() => {
      //     reqUpload(form).then(res => {
      //       if (res.data.code === 200) {
      //         // this.getdetail();
      //         this.fileName = res.data.data
      //         console.log(res.data.data, "sssssssss");
      //         el.$message({
      //           showClose: true,
      //           message: "上传成功",
      //           type: "success"
      //         });
      //       } else {
      //         el.$message({
      //           showClose: true,
      //           message: "上传失败，请重新上传",
      //           type: "error"
      //         });
      //       }
      //     });
      //   });
    }
  }
};
</script>
<style lang="less" scoped>
.search-button {
      width: 77px;
      height: 28px;
      line-height: 28px;
      background: #f1f8fe;
      border: 1px solid #51aef6;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;

      > span {
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #51aef6;
      }

      > img {
        width: 20px;
        height: 20px;
        margin-right: 4px;
      }
    }
@fontFamily:"Microsoft YaHei";
.xpaasOne-table-class {
  border: 1px solid #004ca7;
  border-radius: 9px;
  > ::v-deep div.el-table__header-wrapper {
    > table.el-table__header {
      > thead {
        > tr.xpaasOne-header-row-class {
          padding: 0;
          height: 38px;
          background-color: #edf2f9;
          font-size: 16px;
          font-family: Microsoft YaHei;
          font-weight: bold;
          line-height: 20px;
          color: #004ca7;
          > th.xpaasOne-header-cell-class {
            font-weight: bold;
            border-right: 1px solid #c7d7eb;
            border-left: 0;
            border-bottom: 1px solid #c7d7eb;
            background-color: #edf2f9;
            > div.cell {
              font-size: 16px;
              font-weight: bold;
              font-family: @fontFamily;
              color: #004ca7;
            }
          }
        }
      }
    }
  }
  > ::v-deep div.el-table__body-wrapper {
    > table.el-table__body {
      > tbody {
        > tr.xpaasOne-row-class {
          > td.xpaasOne-header-cell-class {
            border-right: 1px solid #c7d7eb;
            border-left: 0;
            border-bottom: 1px solid #c7d7eb;
            background-color: #edf2f9;
            > div.cell {
              font-size: 16px;
              font-weight: bold;
              font-family: @fontFamily;
              color: #004ca7;
            }
          }
          > td.xpaasOne-cell-class {
            height: 38px;
            border-right: 1px solid #c7d7eb;
            border-left: 0;
            border-bottom: 1px solid #c7d7eb;
            > div.cell {
              font-weight: normal;
              font-family: @fontFamily;
              color: #004ca7;
            }
          }
        }
      }
    }
  }
}
.img {
  width: 17px;
  height: 17px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.bk {
  /deep/ .el-input__inner {
    border-radius: 4px;
    border: 1px solid #004ca7;
  }
}
.zyjs {
  width: 79% !important;
  margin-left: 40px !important;
  /deep/ .el-input__inner {
    height: 70px !important;
    border-radius: 4px;
    border: 1px solid #004ca7;
  }
}

.el-input {
  width:92%;
  display: flex;
  align-items: center;
  // margin-left: 40px;
}
.my-form-item {
  height: 80px;
}
.el-date-editor {
  width: 38%;
}
.choose-ypr-container {
  width: 100%;
  margin: 0px auto;

  .choose-ypr-search-container {
    .el-input--prefix .el-input__inner {
      padding-left: 30px;
    }

    .el-input__inner {
      &::placeholder {
        color: #b8b8b8;
      }

      &::-webkit-input-placeholder {
        /* WebKit browsers 适配谷歌 */
        color: #b8b8b8;
      }

      &:-moz-placeholder {
        /* Mozilla Firefox 4 to 18 适配火狐 */
        color: #b8b8b8;
      }

      &::-moz-placeholder {
        /* Mozilla Firefox 19+ 适配火狐 */
        color: #b8b8b8;
      }

      &:-ms-input-placeholder {
        /* Internet Explorer 10+  适配ie*/
        color: #b8b8b8;
      }
    }

    display: flex;
    flex-direction: row;
    align-items: center;

    .title {
      font-size: 18px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 20px;
      color: #004ca7;
      margin-right: 5px;
    }

    .search-button {
      width: 77px;
      height: 28px;
      line-height: 28px;
      background: #f1f8fe;
      border: 1px solid #51aef6;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;

      > span {
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #51aef6;
      }

      > img {
        width: 20px;
        height: 20px;
        margin-right: 4px;
      }
    }

    .button-list {
      display: flex;
      flex-direction: row;
      align-items: center;
      margin-left: 21px;

      .button-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 69px;
        height: 27px;
        line-height: 27px;
        border: 1px solid #004ca7;
        border-radius: 4px;
        margin-right: 10px;
        text-align: center;
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #004ca7;

        .del-icon {
          position: absolute;
          right: 0px;
          top: 0px;
          width: 12px;
          height: 12px;
          padding: 2px;
        }
      }
    }
  }

  .choose-ypr-container .choose-ypr-table-container .el-table__header th {
    padding: 0;
    height: 57px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  /deep/ .el-table .cell {
    color: #004ca7;
  }

  .choose-ypr-table-container {
    margin-top: 30px;

    .el-table td,
    .el-table th.is-leaf,
    .el-table--border,
    .el-table--group {
      border-color: #c7d7eb;
    }

    .el-table__header tr,
    .el-table__header th {
      padding: 0;
      height: 57px;
      background-color: #edf2f9;
      font-size: 16px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 20px;
      color: #004ca7;
    }

    .el-table__body tr,
    .el-table__body td {
      padding: 0;
      height: 51px;
    }

    .table-data {
      width: 100%;
      border: 0.8px solid #004ca7;
      border-radius: 9px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #004ca7;
    }
  }
}

.assessment-container {
  .el-dialog__body {
    height: 251px;
  }

  .el-dialog__footer {
    padding: 10px 20px 45px;
  }

  .el-checkbox__inner:hover {
    border-color: #004ca7;
  }

  .el-checkbox__inner {
    border: 1px solid #004ca7;
    border-radius: 0;
    height: 18px;
    width: 18px;
  }

  .el-checkbox__inner::after {
    height: 10px;
    left: 6px;
  }

  .el-checkbox__input.is-checked .el-checkbox__inner,
  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
    background-color: #004ca7;
    border-color: #004ca7;
  }

  .el-checkbox__input.is-checked + .el-checkbox__label {
    color: #004ca7;
  }

  .el-checkbox.is-bordered.is-checked {
    border-color: #004ca7;
  }

  .el-checkbox__input.is-focus .el-checkbox__inner {
    border-color: #004ca7;
  }
}

.cz-save {
  box-sizing: border-box;
  line-height: 44px;
  border-radius: 4px;
  font-size: 12px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  text-align: center;
  margin-top: 70px;
  margin-left: 40px;
  display: flex;
  flex-direction: row;
  cursor: pointer;
  align-content: center;
  justify-content: center;
  align-items: center;
}

.jf-save {
  display: flex;
  align-items: center;
  margin-left: 48px;
}

.fileClass {
  position: relative;
  cursor: pointer;

  .save {
    width: 120px;
    height: 25px;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    color: #fff;
    background: #303133;
  }
}

.my-form-item-value {
  font-size: 16px;
  color: #004ca7;
  height: 100%;
  flex: 1;
  line-height: 60px;
  padding-left: 38px;
  display: flex;
  align-items: center;
}

.assessment-edit-plan-container {
  .assessment-design {
    .el-textarea__inner {
      resize: none;
      font-size: 16px;
      color: rgba(0, 76, 167, 1);
    }
  }
}
</style>
<style scoped lang="less">
.assessment-edit-plan-container {
  .assessment-design {
    padding: 25px 38px !important;
  }

  .button-group {
    cursor: pointer;
    margin-top: 25px;
    text-align: center;

    > div {
      display: inline-block;
      font-size: 18px;
      padding: 6px 22px;
      border-radius: 6px;

      &:nth-child(1) {
        color: #f3b815;
        border: 1px solid #f3b815;
        background: #fff6ef;
        margin-right: 139px;
      }

      &:nth-child(2) {
        color: #ff3819;
        border: 1px solid #ff3819;
        background: #ffefef;
      }
    }
  }
}
.mini {
  width: 10%;
  margin-left: 0;
}
.my-form-item-value div p span {
  padding: 0 5px;
}
</style>
<style lang="less" scoped>
.selectStudentDialog .el-table td,
.el-table th {
  text-align: center;
  border-right: auto;
}
.ts .el-scrollbar__view {
  height: auto;
}
.courseSetDialog .el-dialog__body {
  display: flex;
 // justify-content: space-around;
  justify-content: center;
}
.courseSetDialog .el-dialog__body > .el-tree {
  width: 165px;
  border: 0 none;
}
.courseSetDialog .el-dialog__body > .el-tree > div {
  border: 0 none;
}
.courseSetDialog .el-dialog__body > .el-tree > div > div > div:nth-child(1) {
  width: auto;
  height: auto;
  font-weight: 100;
  color: ;
}
.courseSetDialog .el-dialog__body > .el-tree > div > div > div {
  display: block;
  height: auto;
}
</style>
